#include "Course.h"


void main3_1_2()
{
	cout << "Uppgift 1" << endl << endl;
	Student student1;
	Student student2("Van", "Nguyen", 2012);

	student1.setFirstName("Kalle");
	student1.setSecondName("Anka");
	student1.setEnrollmentYear(2000);

	cout << student1.getFirstName() << " " << student1.getSecondName() << " " << student1.getEnrollmentYear() << endl;
	cout << student2.getFirstName() << " " << student2.getSecondName() << " " << student2.getEnrollmentYear() << endl << endl;

	cout << "Uppgift 2" << endl << endl;

	Student student3;
	student3.Read();

	student3.Write();
	
}

void main3_3()
{
	//istringstream iss("(Kalle,Nguyen,2012)");
	Student student1;
	Student student2("Van", "Nguyen", 2012);

	//iss >> student1;
	cin >> student1;
	cout << student1 << endl << student2 << endl;
}

void main3_4()
{
	Student student1("Kalle", "Anka", 2000);
	Student student2("Van", "Nguyen", 2012);
	StudentRegister sr;
	sr.Add(student1);
	sr.Add(student2);

	cout << sr.List() << endl;

}

void main3_5()
{
	Student student1("Kalle", "Anka", 2000);
	Student student2("Van", "Nguyen", 2012);
	StudentRegister sr;
	sr.Add(student1);
	sr.Add(student2);
	sr.writeFile("student.txt");
}

void main3_6()
{
	StudentRegister sr;
	sr.readFile("student.txt");
	cout << sr.List();
}

int main()
{
	setlocale(LC_ALL, "Swedish");
	//main3_1_2();
	//main3_3();
	//main3_4();
	//main3_5();
	//main3_6();
	while (1) {
	Course c;
	c.Menu();
	}

	system("PAUSE");
	return 0;
}